{include file="public/head" /}
<body class="body_style">
{include file="public/menu" /}
{load href="__static__/hry/newfonticon/iconfont.css" /}
<div class="member">
    <div class="wrap">
        <div class="aside">
			{include file="public/left" /}
        </div>
        <div class="page">
            <div class="top">
                <div class="p1">我的资产数据</div>
                <div class="p2">
                    <div class="moneyBox">
                        <div class="balance">
                            <div class="money">{$member.money}</div>
                            <p>我的余额（元）</p>
                        </div>
                        <div class="btn">
                            <a href="{:url('Member/recharge')}" class="cz"><i class="iconfont iconchongzhi"></i>充值</a>
                            <a href="{:url('Member/getcash')}" class="tx"><i class="iconfont icontixian"></i>提现</a>
                        </div>
                    </div>
                    <div class="shareBox">
                        {if $member.is_check eq 1}
                        <span class="title">我的邀请码：</span><br>
                        <div class="fz">
                            <i style='color:#fd7400' title="{$url}/mobile/#/register?invite={$member.invite}">{$member.invite}</i>
                            <span style='cursor:pointer;' id="copyUrl">复制</span>
                        </div>
                        <div style="text-align: center">
                            <span style='cursor:pointer;' id="Share">分享<i class="iconfont iconfenxiang"></i></span>
                        </div>
                        {/if}
                    </div>
                </div>
            </div>
            <div class="bottom">
			<form action="{:url('Member/index')}" method="post">
                <div class="head">
                    <span class="fl">账单</span>
                    <span class="fr">
						<select name="type">
							<option value="">类型</option>
							<option value="1" {if condition=" :input('type') eq 1 "}selected="selected"{/if}>消费</option>
							<option value="2" {if condition=" :input('type') eq 2 "}selected="selected"{/if}>充值</option>
							<option value="3" {if condition=" :input('type') eq 3 "}selected="selected"{/if}>退还</option>
							<option value="4" {if condition=" :input('type') eq 4 "}selected="selected"{/if}>结算</option>
							<option value="5" {if condition=" :input('type') eq 5 "}selected="selected"{/if}>提现</option>
						</select>
                        <input type="text" class="layui-input" name="start" value="{:input('start')}" id="start" placeholder="yyyy-MM-dd" autocomplete="off">
                        至
                        <input type="text" class="layui-input" name="end" value="{:input('end')}" id="end" placeholder="yyyy-MM-dd" autocomplete="off">
                        <input type="submit" value="搜索" style="cursor:pointer;">
                    </span>
                </div>
			</form>
                <table cellpadding="0" cellspacing="0">
                    <tr>
                        <th>单号</th>
                        <th>类型</th>
                        <th>金额</th>
                        <!--<th>状态</th>-->
						<th><span>时间</span></th>
                    </tr>
					{if condition="$dataList->isEmpty()"}
					<tr>
						<td colspan="5">没有数据~</td>
					</tr>
					{/if}
					{volist name="dataList" id="vo"}
					<tr>
						<td>{$vo.order}</td>
						<td>{$vo.type}</td>
						<td>{$vo.money}</td>

						<!--<td>{if $vo.status eq 0}
                            1234
                            {elseif $vo.status eq 1}
                            待打款
                            {elseif $vo.status eq 2 }
                            已打款
                            {elseif $vo.status eq 3 }
                            已拒绝
                            {/if}
                            </td>-->
						<td>{$vo.create_time}</td>
						</td>
					</tr>
					{/volist}
                </table>
				<div id="pages">
					{$dataList->render()}
				</div>
            </div>
        </div>
        <div class="clear"></div>
    </div>
</div>
{include file="public/foot" /}
</body>
{include file="public/load_bottom" /}
<script src="__static__/hry/dist/clipboard.min.js"></script>
<script>
layui.use('laydate', function(){
  var laydate = layui.laydate;
  //常规用法
  laydate.render({
    elem: '#start'
  });
  laydate.render({
    elem: '#end'
  });
});

var clipboard = new ClipboardJS('#copyUrl', {
	text: function() {
		return '{$url}/mobile/#/register?invite={$member.invite}';
	}
});

clipboard.on('success', function(e) {
	layer.msg('复制成功')
});

clipboard.on('error', function(e) {
	layer.alert('复制失败,请手动复制邀请链接：'+'{$url}/mobile/#/register?invite={$member.invite}');
});

$(function(){
	$("#Share").click(function(){
		layer.open({
		  type: 2,
		  title: '分享',
		  shadeClose: true,
		  shade: 0.8,
		  area: ['380px', '50%'],
		  content: "{:url('About/share')}"
		}); 
	})
})

if("{$wantToLookinto}" == 1){
	layer.alert('您还没有进行风险评估！',{
		  icon: 3,
		  skin: 'layer-ext-moon',
		  btn: '去评估'
		},function(){
		window.location.href = "{:url('Member/lookinto')}"
	});
}
</script>
</html>